.buyCardModalContainer {
  padding: 20px;
  background-color: #f5f5f5;
  border-radius: 8px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;

  .modalHeader {
    text-align: center;
    margin-bottom: 20px;

    .headerTitle {
      font-size: 24px;
      font-weight: bold;
      color: #333;
    }
  }

  .cardInfo {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .requiredGemsSection,
  .playerGemsSection {
    margin-bottom: 20px;

    .sectionTitle {
      display: block;
      font-size: 18px;
      font-weight: bold;
      margin-bottom: 10px;
      color: #333;
    }

    .gemsContainer {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      min-height: 50px;
      padding: 10px;
      background-color: #fff;
      border-radius: 4px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

      .freeText {
        font-size: 16px;
        color: #4caf50;
        font-weight: bold;
      }
    }
  }

  .gem-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;

    &.selected {
      transform: scale(1.1);
      box-shadow: 0 0 0 3px #fff, 0 0 0 5px #2196f3;
    }

    .gem-text {
      color: #fff;
      font-weight: bold;
      font-size: 12px;
    }

    .selected-overlay {
      position: absolute;
      top: -3px;
      right: -3px;
      width: 16px;
      height: 16px;
      background-color: #4caf50;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;

      &::after {
        content: "✓";
        color: white;
        font-size: 10px;
      }
    }

    // 宝石颜色
    &.red-gem {
      background-color: #f44336;
    }

    &.blue-gem {
      background-color: #2196f3;
    }

    &.green-gem {
      background-color: #4caf50;
    }

    &.white-gem {
      background-color: #ffffff;
      border: 1px solid #ccc;

      .gem-text {
        color: #333;
      }
    }

    &.black-gem {
      background-color: #212121;
    }

    &.pink-gem {
      background-color: #e91e63;
    }

    &.gold-gem {
      background-color: #ff9800;
    }
  }

  .selectionInfo {
    margin-bottom: 20px;
    text-align: center;
    font-size: 16px;
    color: #333;
  }

  .modalActions {
    display: flex;
    justify-content: space-between;
    gap: 10px;

    .actionBtn {
      flex: 1;
      padding: 12px;
      border: none;
      border-radius: 4px;
      font-size: 16px;
      cursor: pointer;
      transition: background-color 0.3s;

      &.confirmBtn {
        background-color: #4caf50;
        color: white;

        &:hover {
          background-color: #45a049;
        }
      }

      &.resetBtn {
        background-color: #ff9800;
        color: white;

        &:hover {
          background-color: #e68900;
        }
      }

      &.cancelBtn {
        background-color: #f44336;
        color: white;

        &:hover {
          background-color: #da190b;
        }
      }
    }
  }
}